﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Devida/Siste.master" AutoEventWireup="false" CodeFile="Mantenimiento_Menu.aspx.vb" Inherits="Devida_Mantenimiento_Menu" Theme="Yahoo-Ocean"%>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register namespace="AjaxControlToolkit" tagprefix="AjaxControlToolkit" %>
<%@ Register src="ucAlerta.ascx" TagName="Alerta" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<base target="_self" />
<link href="../css/EstilosFrm.css" type="text/css" rel="stylesheet" /> 
   <link href="../css/i_consultas.css" type="text/css" rel="stylesheet" />
   <link href="../css/diseno.css" type="text/css" rel="Stylesheet" />
    <link href="../css/style2.css" type="text/css" rel="stylesheet" />
    <link href="../css/StyleSheet.css" type="text/css" rel="stylesheet" />
    
    <script src="../js/jsForms/js_Consulta.js" type="text/javascript"></script>
    <script src="../js/js_windowpopup.js" type="text/javascript"></script>
    <script language="javascript" src="../Script/PrintScript.js" type="text/javascript"> </script>
<script language="javascript" type="text/javascript">


    function startWord(strFile) {
        var myApp = new ActiveXObject("Word.Application");
        if (myApp != null) {
            myApp.Visible = true;
            myApp.Documents.Open(strFile);
        }
    }
    function Resaltar_On(GridView) {
        if (GridView != null) {
            GridView.originalBgColor = GridView.style.backgroundColor;
            GridView.style.backgroundColor = "#5BADFF";
        }
    }

    function Resaltar_Off(GridView) {
        if (GridView != null) {
            GridView.style.backgroundColor = GridView.originalBgColor;
        }
    }
    
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cph_name" Runat="Server">
<asp:Label ID="lblcabecera" runat="server" font-names="arial" Font-Size="17px" ForeColor="white" font-bold="true" text="Mantenimiento Menu"></asp:Label>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table  cellpadding="0" cellspacing="0" style="width: 900px; height: 300px; text-align:left">
<tr>
<td>
<cc1:TabContainer ID="TabContainer1" runat="server" Visible="true" 
        ActiveTabIndex="0">
     <cc1:TabPanel ID="TabPanel1" runat="server" HeaderText="MENU">
    <ContentTemplate>
    <table cellpadding="0" cellspacing="0" width="900px" >
    <tr>
<td style="TEXT-ALIGN:left; padding-left: 10px; padding-top: 3px;  font-size: 12px;
            font-weight: bolder;  font-family: Arial, Helvetica, sans-serif; color: #FFFFFF; background-color:#199A44; ">
<asp:Label ID="labelusuario" runat="server" Text="Datos " Font-Bold="True" Width="900px"></asp:Label>

</td>
</tr>
    </table>
    <table cellpadding="0" cellspacing="0" width="900px">

 <tr>
 <td></td>
 <td></td>
 <td></td>
 <td></td>
 <td></td>
 <td></td>
</tr>

 <tr>
             <td align="left">
            
                <asp:Label id="label7" runat="server" CssClass="label" Text="ID_MENU" ></asp:Label>
             
            </td>
             <td align="left" >
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
            <asp:TextBox ID="txtidmenu" runat="server" cssclass="frm_formato_caja" Width="50px"></asp:TextBox>
            </ContentTemplate>
                 <Triggers>
     <asp:AsyncPostBackTrigger ControlID="gv_menu" EventName="SelectedIndexChanged" />
      </Triggers>
                 </asp:UpdatePanel>
            </td>
             <td align="left">
            
                <asp:Label id="label4" runat="server" CssClass="label" Text="Descripcion" ></asp:Label>
           
</td>
             <td align="left" >
            <asp:UpdatePanel ID="UpdatePanel6" runat="server">
                                        <ContentTemplate>
            <asp:TextBox ID="txtdescripcion" runat="server" cssclass="frm_formato_caja"  Width="150px" ></asp:TextBox>
               </ContentTemplate>
                 <Triggers>
     <asp:AsyncPostBackTrigger ControlID="gv_menu" EventName="SelectedIndexChanged" />
      </Triggers>
                 </asp:UpdatePanel>
            </td>
             <td >
             <asp:Label ID="lblpid" runat="server" CssClass="label" text="Padre ID"></asp:Label>
             </td>
             <td>
             <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                                        <ContentTemplate>
             <asp:TextBox ID="txtpadreid" runat="server" cssclass="frm_formato_caja" Width="50px"></asp:TextBox>
                                                                
            </ContentTemplate>
                 <Triggers>
     <asp:AsyncPostBackTrigger ControlID="gv_menu" EventName="SelectedIndexChanged" />
      </Triggers>
                 </asp:UpdatePanel>
             </td>
             <td>
<asp:UpdatePanel ID="UpdatePanel5" runat="server">
                                        <ContentTemplate>
<asp:Label id="label2" runat="server" CssClass="label" Text="Posicion" > </asp:Label>
            


</ContentTemplate>
                 <Triggers>
     <asp:AsyncPostBackTrigger ControlID="gv_menu" EventName="SelectedIndexChanged" />
      </Triggers>
                 </asp:UpdatePanel>
</td>
             <td>
             <asp:UpdatePanel ID="UpdatePanel8" runat="server">
                                        <ContentTemplate>
             <asp:TextBox ID="txt_posicion" runat="server" cssclass="frm_formato_caja" Width="50px"></asp:TextBox>
             </ContentTemplate>
                 <Triggers>
     <asp:AsyncPostBackTrigger ControlID="gv_menu" EventName="SelectedIndexChanged" />
      </Triggers>
                 </asp:UpdatePanel>
             </td>
             <td>
             <asp:Label id="lblestado" runat="server" CssClass="label" Text="Estado" ></asp:Label>
             </td>
             <td>
             <asp:UpdatePanel ID="UpdatePanel9" runat="server">
                                        <ContentTemplate>
             <asp:DropDownList ID="ddl_estado" runat="server" CssClass="ddl" ></asp:DropDownList>
              </ContentTemplate>
                 <Triggers>
     <asp:AsyncPostBackTrigger ControlID="gv_menu" EventName="SelectedIndexChanged" />
      </Triggers>
                 </asp:UpdatePanel>
             </td>
             <td align="right">
             <asp:Label ID="lbltp" runat="server" CssClass="label" Text="URL"></asp:Label>
             </td>
             <td align="right">
             <asp:UpdatePanel ID="UpdatePanel4" runat="server">
                                        <ContentTemplate>
             <asp:TextBox ID="txturl" runat="server" cssclass="frm_formato_caja" Width="200px"></asp:TextBox>
             </ContentTemplate>
                 <Triggers>
     <asp:AsyncPostBackTrigger ControlID="gv_menu" EventName="SelectedIndexChanged" />
      </Triggers>
                 </asp:UpdatePanel>
             </td>
   <tr>
  
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
 <td align="right" >
                <asp:Label ID="lbl_nuevo" runat="server"  CssClass="label" Text="Nuevo"></asp:Label>
            </td>
 <td align="right">
 <asp:UpdatePanel ID="UpdatePanel7" runat="server">
                                        <ContentTemplate>
                <asp:CheckBox ID="chkb" runat="server" CssClass="chk" AutoPostBack="true" />
                </ContentTemplate>
                </asp:UpdatePanel>

            </td>     
</tr>      


        </tr>




</table>
    <table cellpadding="0" cellspacing="0" width="900px">
<tr >
<td colspan="6" style="TEXT-ALIGN:left; padding-left: 10px; padding-top: 3px;  font-size: 12px;
            font-weight: bolder;  font-family: Arial, Helvetica, sans-serif; color: #FFFFFF; background-color:#199A44; ">
<asp:Label ID="label1" runat="server" Text="Lista de Menus" Font-Bold="True" Width="900px"></asp:Label>
</td>
</tr>

</table>
    <table cellpadding="0" cellspacing="0" width="900px">
<tr>
<td align="left" style="width:50px">
<asp:Label ID="lblbusqueda" runat="server" CssClass="label" Text="ID_MENU"></asp:Label>
</td>
<td align="left" style="width:50px">
<asp:TextBox ID="txt_id_menu" runat="server" CssClass="frm_formato_caja" Width="50px"></asp:TextBox>
</td>
<td align="left" style="width:50px">
<asp:Label ID="lbldecripcion" runat="server" CssClass="label" Text="Descripcion"></asp:Label>
</td>
<td align="left">
<asp:TextBox ID="txtdescripicon" runat="server" CssClass="frm_formato_caja" Width="200px"></asp:TextBox>
</td>

<td align="right">
             <asp:ImageButton ID="boton_busca" runat="server" tooltip="Buscar" ImageUrl="~/Imagenes/btn_acclupa.jpg" />
            </td>
</tr>
</table>
    <table cellpadding="0" cellspacing="0" width="900px">
<tr>
<td>
<div style="border: solid 1px #99aabd; width: 900px; height: 300px; overflow: auto;"align="center">
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
    <ContentTemplate>

         <asp:GridView ID="gv_menu" runat="server" AutoGenerateColumns="False" 
            CellPadding="0" CssClass="grid" Font-Size="8pt" GridLines="None" Width="900px">
            <RowStyle BackColor="#F7F6F3" Font-Bold="False" ForeColor="#333333" />
            <Columns>               
             
                <asp:TemplateField ItemStyle-Width ="5px" >
	               <HeaderStyle CssClass="gridHead" HorizontalAlign="Center" />
	                 <ItemStyle CssClass="gridItem" HorizontalAlign="Right" />
	                  <HeaderTemplate>N° </HeaderTemplate>                                     
                                     <ItemTemplate> <%# Container.DataItemIndex + 1 %>                     
                                            <asp:HiddenField ID="hfestado" runat="server" Value='<%# Eval("ESTADO") %>'  />                                                                                                       
	                                     </ItemTemplate> 
	             </asp:TemplateField>
                 <asp:BoundField DataField="ID_MENU" HeaderText="ID_MENU" ItemStyle-HorizontalAlign="Left"  ItemStyle-VerticalAlign="Top" />
                 <asp:BoundField DataField="DESCRIPCION" HeaderText="Descripcion" ItemStyle-HorizontalAlign="Left"  ItemStyle-VerticalAlign="Top"  />
                <asp:BoundField DataField="PADRE_ID" HeaderText="Padre ID" ItemStyle-HorizontalAlign="Left"  ItemStyle-VerticalAlign="Top"  />
                <asp:BoundField DataField="POSICION" HeaderText="Posicion" ItemStyle-HorizontalAlign="Left"  ItemStyle-VerticalAlign="Top"  />
                <asp:BoundField DataField="HABILITADO" HeaderText="Estado" ItemStyle-HorizontalAlign="Left"  ItemStyle-VerticalAlign="Top"  />
                <asp:BoundField DataField="URL" HeaderText="URL" ItemStyle-HorizontalAlign="Left"  ItemStyle-VerticalAlign="Top"  />                            
            </Columns>
            <SelectedRowStyle BackColor="#5BADFF" Font-Bold="True" ForeColor="#333333" />
            <AlternatingRowStyle BackColor="#CEDAF2" ForeColor="#003366" />
            <PagerStyle BackColor="#336699" Font-Bold="True" Font-Names="Verdana" 
                Font-Size="10px" ForeColor="White" HorizontalAlign="left" Wrap="False" />
        </asp:GridView>
</ContentTemplate>
    <Triggers>
     <asp:AsyncPostBackTrigger ControlID="gv_menu" EventName="SelectedIndexChanged" />
      </Triggers>
    </asp:UpdatePanel>
         </div>
</td>
</tr>
</table>
    <table>
<tr>                    
         <td colspan="6">
                  <div  style= "width: 900px;height: 40px;  overflow: auto;" align="center">
                  <table width="900px">
            <tr>
                        
                        <td align="left" class="style66" >
                               <asp:ImageButton ID="btn_guardar" runat="server" ImageUrl="~/Imagenes/btnGuardar.png" style="height: 23px" />
                            </td>
                        <td align="left">
                        <asp:imageButton ID="btn_eliminar" runat="server" imageURL="~/Imagenes/btnEliminar.png" />
                        </td>
                        
                        <td align="right">                                
                        <asp:ImageButton ID="btnsalir" runat="server"  ImageUrl="~/Imagenes/btnSalir.png" />
                        </td>
                    </tr>
                    </table>
            </div> 
            
            </td>
                    
       </tr>
</table>
    </ContentTemplate>
    </cc1:TabPanel>
     <cc1:TabPanel ID="TabPanel2" runat="server" HeaderText="MENU PERFIL">
     <ContentTemplate>
     <table cellpadding="0" cellspacing="0" width="900px" >
<tr>
<td style="TEXT-ALIGN:left; padding-left: 10px; padding-top: 3px;  font-size: 12px;
            font-weight: bolder;  font-family: Arial, Helvetica, sans-serif; color: #FFFFFF; background-color:#199A44; ">
<asp:Label ID="label5" runat="server" Text="Datos " Font-Bold="True" Width="900px"></asp:Label>

</td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" width="900px">

  <tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
  <tr>
             <td align="left" style="width:50px">
            
                <asp:Label id="label6" runat="server" CssClass="label" Text="ID_MENU" > </asp:Label>
             
            </td>
             <td align="left" style="width:50px" >
            <asp:UpdatePanel ID="UpdatePanelidmenu" runat="server">
            <ContentTemplate>
            <asp:TextBox ID="txtid_menu" runat="server" cssclass="frm_formato_caja" Width="50px"></asp:TextBox>
            </ContentTemplate>
                 <Triggers>
     <asp:AsyncPostBackTrigger ControlID="gv_menuperfil" EventName="SelectedIndexChanged" />
      </Triggers>
                 </asp:UpdatePanel>
            </td>
             <td align="left" style="width:60px">
            
                <asp:Label id="label8" runat="server" CssClass="label" Text="Menu Perfil" > </asp:Label>
           
 </td>
             <td align="left" style="width:50px" >
            <asp:UpdatePanel ID="UpdatePanelmp" runat="server">
                                        <ContentTemplate>
            <asp:TextBox ID="txtmenuperfil" runat="server" cssclass="frm_formato_caja"  Width="50px" ></asp:TextBox>
               </ContentTemplate>
                 <Triggers>
     <asp:AsyncPostBackTrigger ControlID="gv_menuperfil" EventName="SelectedIndexChanged" />
      </Triggers>
                 </asp:UpdatePanel>
            </td>
             <td align="left" style="width:40px">
             <asp:Label ID="Label9" runat="server" CssClass="label" text="Perfil"></asp:Label>
             </td>
             <td align="left" style="width:50px">
             <asp:UpdatePanel ID="UpdatePanelperfil" runat="server">
                                        <ContentTemplate>
             
             <asp:DropDownList ID="ddlperfil" runat="server" CssClass="ddl" ></asp:DropDownList>                                                   
            </ContentTemplate>
                 <Triggers>
     <asp:AsyncPostBackTrigger ControlID="gv_menuperfil" EventName="SelectedIndexChanged" />
      </Triggers>
                 </asp:UpdatePanel>
             </td>
             <td align="left" style="width:50px">
             <asp:Label id="label10" runat="server" CssClass="label" Text="Estado" > </asp:Label>
             </td>
             <td align="left" style="width:100px">
              <asp:UpdatePanel ID="UpdatePanelestado1" runat="server">
                                        <ContentTemplate>
             <asp:DropDownList ID="ddlEstado1" runat="server" CssClass="ddl" ></asp:DropDownList>
             </ContentTemplate>
                 <Triggers>
     <asp:AsyncPostBackTrigger ControlID="gv_menuperfil" EventName="SelectedIndexChanged" />
      </Triggers>
                 </asp:UpdatePanel>
             </td>
             <td align="left" style="width:50px" >
                <asp:Label ID="lbl_nuevo1" runat="server"  CssClass="label" Text="Nuevo"></asp:Label>
            </td>
             <td align="left" style="width:50px">
 <asp:UpdatePanel ID="UpdatePanelchk" runat="server">
                                        <ContentTemplate>
                <asp:CheckBox ID="chkb1" runat="server" CssClass="chk" AutoPostBack="true"   />
                </ContentTemplate>
                </asp:UpdatePanel>

            </td>
    </tr>         
  <tr>
  
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
      
</tr>      

</table>
<table cellpadding="0" cellspacing="0" width="900px">
<tr >
<td colspan="6" style="TEXT-ALIGN:left; padding-left: 10px; padding-top: 3px;  font-size: 12px;
            font-weight: bolder;  font-family: Arial, Helvetica, sans-serif; color: #FFFFFF; background-color:#199A44; ">
<asp:Label ID="label11" runat="server" Text="Lista de Menu Perfil" Font-Bold="True" Width="900px"></asp:Label>
</td>
</tr>

</table>
<table cellpadding="0" cellspacing="0" width="900px" >
      
<tr>
        
<td align="left" style="width:50px">
<asp:Label ID="lblidperfil" runat="server" CssClass="label" Text="ID_MENU">
</asp:Label>
</td>
<td align="left" style="width:50px">
<asp:TextBox ID="txtidmenuperfil" runat="server" CssClass="frm_formato_caja" Width="50px"></asp:TextBox>
</td>
<td align="left" style="width:70px">
<asp:Label ID="lblmenuperfil" runat="server" CssClass="label" Text="Menu Perfil">
</asp:Label>
</td>
<td align="left" style="width:100px">
<asp:TextBox ID="txt_Menu_Perfil" runat="server" CssClass="frm_formato_caja" >
</asp:TextBox>
</td>
<td align="left" style="width:50px">
<asp:Label ID="lblPerfil" runat="server" CssClass="label" Text="Perfil"></asp:Label>
        </td>
<td align="left" style="width:100px">
<asp:DropDownList ID="ddl_Perfil" runat="server" CssClass="ddl" ></asp:DropDownList>
</td>
<td align="right">
<asp:ImageButton ID="buscar2" runat="server" ImageUrl="~/Imagenes/btn_acclupa.jpg" style="height: 22px;" Width="22px" />
</td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" width="900px">
<tr>
<td>
<div style="border: solid 1px #99aabd; width: 900px; height: 300px; overflow: auto;"align="center">
<asp:UpdatePanel ID="UpdatePanel10" runat="server">
    <ContentTemplate>

         <asp:GridView ID="gv_menuperfil" runat="server" AutoGenerateColumns="False" 
            CellPadding="0" CssClass="grid" Font-Size="8pt" GridLines="None" Width="900px">
            <RowStyle BackColor="#F7F6F3" Font-Bold="False" ForeColor="#333333" />
            <Columns>               
             
                <asp:TemplateField ItemStyle-Width ="5px" >
	               <HeaderStyle CssClass="gridHead" HorizontalAlign="Center" />
	                 <ItemStyle CssClass="gridItem" HorizontalAlign="Right" />
	                  <HeaderTemplate>N° </HeaderTemplate>                                     
                                     <ItemTemplate> <%# Container.DataItemIndex + 1 %>                  
                                            <asp:HiddenField ID="hfEstado1" runat="server" Value='<%# Eval("ESTADO") %>'  />                                       
                                            <asp:HiddenField ID="hfPerfil" runat="server" Value='<%# Eval("PERFIL") %>'  />                                                                                                     
	                                 </ItemTemplate> 
	             </asp:TemplateField>
                 <asp:BoundField DataField="ID_MENU" HeaderText="ID_MENU" ItemStyle-HorizontalAlign="Left"  ItemStyle-VerticalAlign="Top" />
                 <asp:BoundField DataField="MENU_PERFIL" HeaderText="Menu_Perfil" ItemStyle-HorizontalAlign="Left"  ItemStyle-VerticalAlign="Top"  />
                <asp:BoundField DataField="PERFIL" HeaderText="Perfil" ItemStyle-HorizontalAlign="Left"  ItemStyle-VerticalAlign="Top"  />
                <asp:BoundField DataField="ESTADO" HeaderText="Estado" ItemStyle-HorizontalAlign="Left"  ItemStyle-VerticalAlign="Top"  />
            </Columns>
            <SelectedRowStyle BackColor="#5BADFF" Font-Bold="True" ForeColor="#333333" />
            <AlternatingRowStyle BackColor="#CEDAF2" ForeColor="#003366" />
            <PagerStyle BackColor="#336699" Font-Bold="True" Font-Names="Verdana" 
                Font-Size="10px" ForeColor="White" HorizontalAlign="left" Wrap="False" />
        </asp:GridView>
</ContentTemplate>
    <Triggers>
     <asp:AsyncPostBackTrigger ControlID="gv_menuperfil" EventName="SelectedIndexChanged" />
      </Triggers>
    </asp:UpdatePanel>
         </div>
</td>
</tr>
</table>
<table>
<tr>                    
         <td colspan="6">
                  <div  style= "width: 900px;height: 40px;  overflow: auto;" align="center">
                  <table width="900px">
            <tr>
                        
                        <td align="left" class="style66" >
                               <asp:ImageButton ID="btnGuardar1" runat="server" ImageUrl="~/Imagenes/btnGuardar.png" style="height: 23px" />
                            </td>
                        <td align="left">
                        <asp:imageButton ID="btnEliminar1" runat="server" imageURL="~/Imagenes/btnEliminar.png" />
                        </td>
                        
                        <td align="right">                                
                        <asp:ImageButton ID="btnSalir1" runat="server"  ImageUrl="~/Imagenes/btnSalir.png" />
                        </td>
                    </tr>
                    </table>
            </div> 
            
            </td>
                    
       </tr>
</table>
     </ContentTemplate>
    </cc1:TabPanel>
        
     
     
    </cc1:TabContainer>
</td>
</tr>

 
</table>
<uc1:Alerta id="alerta" runat="server"></uc1:Alerta>
</asp:Content>

